﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace S.Parturition.Domain.Migrations
{
    public partial class 种母分娩 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "ParturitionModel",
                columns: table => new
                {
                    ParturitionId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    UserId = table.Column<int>(type: "int", nullable: false),
                    SheepFileId = table.Column<int>(type: "int", nullable: false),
                    MarkId = table.Column<int>(type: "int", nullable: false),
                    EITag = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    DeliveryDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    GestationDays = table.Column<int>(type: "int", nullable: true),
                    DifficultyDelivery = table.Column<int>(type: "int", nullable: false),
                    FatSheep = table.Column<int>(type: "int", nullable: false),
                    Motherhood = table.Column<int>(type: "int", nullable: true),
                    Lactation = table.Column<int>(type: "int", nullable: true),
                    Mastitis = table.Column<int>(type: "int", nullable: true),
                    BroodNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    HealthyNumber = table.Column<int>(type: "int", nullable: true),
                    LambNumber = table.Column<int>(type: "int", nullable: true),
                    DeformityNumber = table.Column<int>(type: "int", nullable: true),
                    StillbirthsNumber = table.Column<int>(type: "int", nullable: true),
                    MummyNumber = table.Column<int>(type: "int", nullable: true),
                    FreaksNumber = table.Column<int>(type: "int", nullable: true),
                    LiveNumber = table.Column<int>(type: "int", nullable: true),
                    LitterWeight = table.Column<int>(type: "int", nullable: false),
                    Sex = table.Column<bool>(type: "bit", nullable: false),
                    TurnOutBuild = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    TurnOutHuts = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    ShiftToBuild = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    ShiftToHuts = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    CreateBy = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdateBy = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    Auditor = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    AuditTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DocumentNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    SerialNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ParturitionModel", x => x.ParturitionId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "ParturitionModel");
        }
    }
}
